<template>
    <el-dialog title="随访详情" :visible.sync="dialogTableVisible" @close="onClose" class="diaLog">
        <div class="content">
            <span>姓名：{{ gridData.name }}</span>
            <span>编号：{{ gridData.code }}</span>
        </div>
        <el-descriptions border :column="2" size="medium">
            <el-descriptions-item label="随访日期">{{ gridData.followDate }}</el-descriptions-item>
            <el-descriptions-item label="流水号">{{ gridData.lsh }}</el-descriptions-item>
            <el-descriptions-item label="体重(kg)">{{ gridData.weight }}</el-descriptions-item>
            <el-descriptions-item label="身高(cm)">{{ gridData.height }}</el-descriptions-item>
            <el-descriptions-item label="心率(次/分钟)">{{ gridData.heart }}</el-descriptions-item>
            <el-descriptions-item label="腰围(cm)"> {{ gridData.waistline }}</el-descriptions-item>
            <el-descriptions-item label="胸围(cm)">{{ gridData.BW }}</el-descriptions-item>
            <el-descriptions-item label="臀围(cm)"> {{ gridData.zipline }}</el-descriptions-item>
            <el-descriptions-item label="收缩压(mmhg)">{{ gridData.SBP }}</el-descriptions-item>
            <el-descriptions-item label="舒张压(mmhg)">{{ gridData.DBP }}</el-descriptions-item>
            <el-descriptions-item label="遵医行为">{{ gridData.obey }}</el-descriptions-item>
            <el-descriptions-item label="心理情况">{{ gridData.mentality }}</el-descriptions-item>
            <el-descriptions-item label="日吸烟量(支/日)">{{ gridData.smoking }}</el-descriptions-item>
            <el-descriptions-item label="日饮酒量(两/日)">{{ gridData.drink }}</el-descriptions-item>
            <el-descriptions-item label="运动情况(分钟/日)">{{ gridData.sports }}</el-descriptions-item>
            <el-descriptions-item label="症状">{{ gridData.symptom }}</el-descriptions-item>
            <el-descriptions-item label="是否转诊">{{ gridData.transfer }}</el-descriptions-item>
            <el-descriptions-item label="原因"> {{ gridData.reason ? gridData.reason : "无" }}</el-descriptions-item>
            <el-descriptions-item label="转诊机构" :span="2">{{ gridData.organ ? gridData.organ : "无"
                }}</el-descriptions-item>
            <el-descriptions-item label="医生建议" :span="2"> {{ gridData.suggest }}</el-descriptions-item>
            <el-descriptions-item label="随访医生">{{ gridData.followDoctor }}</el-descriptions-item>
            <el-descriptions-item label="下次随访时间">{{ gridData.nextDate }}</el-descriptions-item>
        </el-descriptions>
        <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="onClose">确 定</el-button>
        </span>
    </el-dialog>
</template>

<script>
export default {
    name: 'followupData-page',
    /**
    * 定义组件的data函数，用于声明组件内部的状态。
    * 
    * @returns {Object} 返回一个对象，其中包含组件内部的状态。这些状态将在组件的生命周期内被管理和使用。
    */
    data() {
        return {
            msg: 'followupData-page',
            dialogTableVisible: false,
            gridData: {}
        }
    },
    methods: {
        open(row) {
            this.dialogTableVisible = true;
            this.gridData = row;
        },
        onClose() {
            console.log('关闭列表弹窗');
            this.$emit('close');
        }
    }
}
</script>

<style scoped lang="less">
.diaLog {
    .content {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        padding: 0 20px;
    }

    /deep/ .el-descriptions {
        & .is-bordered-label {
            background: #fff;
        }

        & .el-descriptions-item__label.is-bordered-label {
            color: #909399;
        }

        & .is-bordered .el-descriptions-item__cell {
            border: 1px solid #000 !important;
        }
    }
}
</style>